import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;

public class project10{
    public static void main(String[] args) {
        String path="E:\\湖北师范大学\\test.txt";
        File file=new File(path);
        try{
            PrintStream printStream=new PrintStream(file);
            printStream.println("alfhwoea");
            printStream.print("hfwoe");
            printStream.close();
            }catch (FileNotFoundException e){
            throw new RuntimeException(e);
        }
    }

}